// 定义一个公用方法，接受path、data、method作为参数
function callContainerApi(path, data, method) {
  return new Promise((resolve, reject) => {
    wx.cloud.callContainer({
      "config": {
        "env": "prod-4grtktzx4e7361eb"
      },
      "path": path,
      "header": {
        "X-WX-SERVICE": "springboot-kjts"
      },
      "method": method,
      "data": data
    }).then((res) => {
      resolve(res);
    }).catch((err) => {
      reject(err);
    });
  });
}

export {callContainerApi}